package com.cmsr.springclond.state;

import java.util.HashMap;
import java.util.Map;

public class PayTypeFactory {
    private static Map<String,PayState> payStateMap=new HashMap<>();

    static {
        payStateMap.put("1",new PayFactoryByBalance());
        payStateMap.put("2",new PayFactoryByHuabei());
        payStateMap.put("3",new PayFactoryByYuEBAO());
    }

    public static PayState getPayType(String type){
        return payStateMap.get(type);
    }
}
